//---------------------------------------------------------------------------

#ifndef KART_ABONH
#define KART_ABONH
//---------------------------------------------------------------------------
#include <Classes.hpp>
#include <Controls.hpp>
#include <StdCtrls.hpp>
#include <Forms.hpp>
#include "cxContainer.hpp"
#include "cxControls.hpp"
#include "cxEdit.hpp"
#include "cxGraphics.hpp"
#include "cxGroupBox.hpp"
#include "cxLookAndFeelPainters.hpp"
#include "cxLookAndFeels.hpp"
#include <ExtCtrls.hpp>
#include "DBCtrlsEh.hpp"
#include <DB.hpp>
#include <DBCtrls.hpp>
#include <Mask.hpp>
#include "Fr_Adres.h"
#include <ComCtrls.hpp>
#include <ActnList.hpp>
#include "cxButtons.hpp"
#include <Menus.hpp>
#include <DBGrids.hpp>
#include <Grids.hpp>
#include "cxCalc.hpp"
#include "cxDropDownEdit.hpp"
#include "cxMaskEdit.hpp"
#include "cxTextEdit.hpp"
#include "DBGridEh.hpp"
#include "DBGridEhGrouping.hpp"
#include "GridsEh.hpp"
#include "cxClasses.hpp"
#include "cxCustomData.hpp"
#include "cxData.hpp"
#include "cxDataStorage.hpp"
#include "cxDBData.hpp"
#include "cxFilter.hpp"
#include "cxGrid.hpp"
#include "cxGridCustomTableView.hpp"
#include "cxGridCustomView.hpp"
#include "cxGridDBTableView.hpp"
#include "cxGridLevel.hpp"
#include "cxGridTableView.hpp"
#include "cxStyles.hpp"
#include "cxDBNavigator.hpp"
#include "cxNavigator.hpp"
#include "DBAccess.hpp"
#include "IBC.hpp"
#include "MemDS.hpp"
//---------------------------------------------------------------------------
class TfrKART_ABON : public TForm
{
__published:	// IDE-managed Components
	TPanel *pKART1;
	TcxGroupBox *gbKART1;
	TLabel *Label1;
	TDBEdit *dbeNOM;
	TLabel *Label2;
	TDBDateTimeEditEh *dtpDATA_DOG;
	TLabel *Label3;
	TDBDateTimeEditEh *dtpDateSver;
	TLabel *Label4;
	TFrame_Adres *Frame_Adres1;
	TGroupBox *gbHAR_DOMA;
	TLabel *Label5;
	TLabel *Label6;
	TLabel *Label7;
	TLabel *Label8;
	TLabel *Label9;
	TLabel *Label10;
	TDBLookupComboBox *cbGEU;
	TDBLookupComboBox *cbKONTR;
	TDBLookupComboBox *cbMNOGOET;
	TDBEdit *dbeTEL_D;
	TDBEdit *dbeTEL_R;
	TPanel *pKOL_J;
	TPanel *pVID_GAZA;
	TGroupBox *gbP2;
	TLabel *Label19;
	TLabel *Label20;
	TLabel *Label21;
	TDBText *labPLIT;
	TDBText *labKOL_KOTL;
	TDBText *labKOL_BPG;
	TLabel *Label22;
	TStatusBar *sb1;
	TStatusBar *sb2;
	TPanel *pKorrekt;
	TcxButton *btPRIB;
	TActionList *alUpr;
	TAction *Adres;
	TAction *Vid_gaza;
	TAction *Tarif;
	TAction *Counter;
	TAction *Pribor;
	TAction *BH_OST;
	TAction *UCHASTOK;
	TAction *AddPrib;
	TAction *Delete;
	TAction *EditPrib;
	TLabel *Label51;
	TLabel *Label52;
	TAction *Otkl_Prib;
	TAction *Podtv_LG;
	TAction *Cancel_LG;
	TAction *Add_LG;
	TAction *Gurnal_LG;
	TAction *AKT_SVER;
	TAction *Korrekt;
	TAction *KORREKT_JIL;
	TAction *SAVE;
	TAction *SHETCHIK;
	TAction *PR_MER;
	TAction *BRON;
	TEdit *edFIO;
	TAction *SPISOK_OTKL_PRIB;
	TAction *GILZI;
	TAction *DVIG_GILZ;
	TAction *LG;
	TAction *PERESH;
	TPanel *pKART2;
	TcxGroupBox *gbBH_OST;
	TLabel *Label49;
	TLabel *Label50;
	TLabel *Label53;
	TDBEdit *dbeBH_OST;
	TDBEdit *dbeNAH_POK;
	TDBEdit *dbeKON_POK;
	TcxGroupBox *gbCounter;
	TGroupBox *gbSc1;
	TLabel *Label25;
	TLabel *Label24;
	TLabel *Label28;
	TLabel *Label30;
	TLabel *Label31;
	TDBText *labKOD;
	TDBText *labMARKA;
	TDBText *labMODEL;
	TDBText *labDATA_UST;
	TDBText *labZAV_NOM;
	TGroupBox *gbSc2;
	TLabel *Label32;
	TLabel *Label33;
	TLabel *Label36;
	TLabel *Label38;
	TLabel *Label39;
	TDBText *labPLOMB;
	TDBText *labDATA_PLOMB;
	TDBText *labRAZR;
	TGroupBox *gbSc3;
	TLabel *Label41;
	TLabel *Label42;
	TLabel *Label43;
	TDBText *labDATA_IZG;
	TDBText *labIZGOTOV;
	TLabel *Label57;
	TDBText *labISPOLN;
	TGroupBox *gbSc4;
	TLabel *Label46;
	TLabel *Label47;
	TLabel *Label48;
	TDBText *labPOK_UST;
	TDBText *labKON_POK;
	TDBText *dbePOK_BANKA;
	TLabel *Label44;
	TDBText *labDAT_POV;
	TDBText *labDATA_ZAM;
	TLabel *Label45;
	TcxGroupBox *gbPERESH;
	TDBGrid *sgRERESH;
	TcxButton *btDEL_PERESH;
	TcxGroupBox *gbPRIB;
	TLabel *Label54;
	TDBGrid *dgF_PRIB;
	TcxButton *btAddPrib;
	TcxButton *cxButton1;
	TcxButton *cxButton2;
	TcxButton *btOTKL_PRIB;
	TLabel *labOTKL_PRIB1;
	TLabel *labOTKL_PRIB2;
	TEdit *dbeKW_METR;
	TLabel *labSCH_NA_POV;
	TAction *POVERKA;
	TcxGroupBox *gbOplata;
	TLabel *Label17;
	TLabel *Label18;
	TLabel *Label23;
	TLabel *labDOLG_PEREPL;
	TLabel *Label29;
	TLabel *labPOK_TEK;
	TLabel *Label35;
	TLabel *Label37;
	TLabel *Label40;
	TDBText *labDOLG;
	TDBText *labOPLATA;
	TDBText *labISHOD;
	TDBText *labNACH_POK;
	TDBText *labTEK_POK;
	TDBText *labKOL_GAZA;
	TDBText *labPOSL_OPL;
	TDBText *labPOK_BANKA;
	TDBText *labNACH;
	TLabel *Label58;
	TDBText *labSUM_PERESH;
	TAction *OPLATA_NATH;
	TLabel *Label60;
	TAction *HISTORY_PRIB;
	TStatusBar *sbNATH_OPL;
	TAction *PERESH_PO_ABON;
	TLabel *labDOLG_POVERKA;
	TcxGroupBox *gbVID_GAZA;
	TDBLookupComboBox *cbGOR_VOD;
	TDBLookupComboBox *cbTARIF;
	TDBLookupComboBox *cbVID_GAZA;
	TDBLookupComboBox *cbVID_RASH;
	TLabel *Label14;
	TLabel *Label15;
	TLabel *Label16;
	TLabel *Label27;
	TDBText *labSTAT_POV;
	TcxGroupBox *gbPROJ;
	TDBEdit *dbeKOL_BRON;
	TDBEdit *dbeKOL_J;
	TDBEdit *dbeKOL_LGJ;
	TLabel *Label11;
	TLabel *Label12;
	TLabel *Label13;
	TLabel *labNORMA;
	TDBText *labNORMA_TEK;
	TAction *RASHOD_GAZA;
	TIBCQuery *dsetKART1;
	TIBCDataSource *dsKART1;
	TDBText *labMesto;
	TDBText *labKemPlomb;
	TDBText *labRezba;
	TcxButton *btAdres;
	TcxButton *btnVid_gaza;
	TcxButton *btnTarif;
	TcxButton *btnCounter;
	TcxButton *btnPribor;
	TcxButton *btnBH_OST;
	TcxButton *btnUCHASTOK;
	TcxGroupBox *gbOPLATA_NATH;
	TcxGrid *sgTEK_MONTH;
	TcxGridDBTableView *sgTEK_MONTHDBTableView1;
	TcxGridDBColumn *sgTEK_MONTHDBTableView1KOD;
	TcxGridDBColumn *sgTEK_MONTHDBTableView1NAIM;
	TcxGridDBColumn *sgTEK_MONTHDBTableView1Column1;
	TcxGridDBColumn *sgTEK_MONTHDBTableView1Column2;
	TcxGridDBColumn *sgTEK_MONTHDBTableView1Column3;
	TcxGridDBColumn *sgTEK_MONTHDBTableView1Column4;
	TcxGridDBColumn *sgTEK_MONTHDBTableView1Column5;
	TcxGridDBColumn *sgTEK_MONTHDBTableView1Column6;
	TcxGridDBColumn *sgTEK_MONTHDBTableView1Column7;
	TcxGridLevel *sgTEK_MONTHLevel1;
	TcxDBNavigator *navOPL_NATH;
	TAction *actESC;
	TcxGroupBox *gbPodtv_LG;
	TDBGrid *sgPodtv_LG;
	TcxButton *btP_LG;
	TcxButton *btCancel_LG;
	TcxButton *btAdd_LG;
	TcxButton *btGurnal_LG;
	void __fastcall FormClose(TObject *Sender, TCloseAction &Action);
	void __fastcall AdresExecute(TObject *Sender);
	void __fastcall Frame_Adres1dbeBUKVA_KVKeyDown(TObject *Sender, WORD &Key,
          TShiftState Shift);
	void __fastcall cbGEUClick(TObject *Sender);
	void __fastcall cbMNOGOETClick(TObject *Sender);
	void __fastcall dbeTEL_DKeyDown(TObject *Sender, WORD &Key, TShiftState Shift);
	void __fastcall dbeTEL_RKeyDown(TObject *Sender, WORD &Key, TShiftState Shift);
	void __fastcall TarifExecute(TObject *Sender);
	void __fastcall cbVID_RASHClick(TObject *Sender);
	void __fastcall cbTARIFClick(TObject *Sender);
	void __fastcall cbGOR_VODClick(TObject *Sender);
	void __fastcall FormShow(TObject *Sender);
	void __fastcall PriborExecute(TObject *Sender);
	void __fastcall dgF_PRIBDblClick(TObject *Sender);
	void __fastcall dgF_PRIBKeyDown(TObject *Sender, WORD &Key, TShiftState Shift);
	void __fastcall AddPribExecute(TObject *Sender);
	void __fastcall DeleteExecute(TObject *Sender);
	void __fastcall EditPribExecute(TObject *Sender);
	void __fastcall CounterExecute(TObject *Sender);
	void __fastcall BH_OSTExecute(TObject *Sender);
	void __fastcall dbeBH_OSTKeyDown(TObject *Sender, WORD &Key,
          TShiftState Shift);
	void __fastcall dbeNAH_POKKeyDown(TObject *Sender, WORD &Key,
          TShiftState Shift);
	void __fastcall dbeKON_POKKeyDown(TObject *Sender, WORD &Key,
          TShiftState Shift);
	void __fastcall UCHASTOKExecute(TObject *Sender);
	void __fastcall Podtv_LGExecute(TObject *Sender);
	void __fastcall Add_LGExecute(TObject *Sender);
	void __fastcall Vid_gazaExecute(TObject *Sender);
	void __fastcall cbVID_GAZAKeyDown(TObject *Sender, WORD &Key,
          TShiftState Shift);
	void __fastcall sgPodtv_LGDblClick(TObject *Sender);
	void __fastcall sgPodtv_LGKeyDown(TObject *Sender, WORD &Key,
          TShiftState Shift);
	void __fastcall Gurnal_LGExecute(TObject *Sender);
	void __fastcall AKT_SVERExecute(TObject *Sender);
	void __fastcall KorrektExecute(TObject *Sender);
	void __fastcall KORREKT_JILExecute(TObject *Sender);
	void __fastcall SAVEExecute(TObject *Sender);
	void __fastcall SHETCHIKExecute(TObject *Sender);
	void __fastcall PR_MERExecute(TObject *Sender);
	void __fastcall BRONExecute(TObject *Sender);
	void __fastcall Otkl_PribExecute(TObject *Sender);
	void __fastcall SPISOK_OTKL_PRIBExecute(TObject *Sender);
	void __fastcall GILZIExecute(TObject *Sender);
	void __fastcall DVIG_GILZExecute(TObject *Sender);
	void __fastcall LGExecute(TObject *Sender);
	void __fastcall dbeNOMKeyDown(TObject *Sender, WORD &Key, TShiftState Shift);
	void __fastcall PERESHExecute(TObject *Sender);
	void __fastcall Cancel_LGExecute(TObject *Sender);
	void __fastcall POVERKAExecute(TObject *Sender);
	void __fastcall OPLATA_NATHExecute(TObject *Sender);
	void __fastcall HISTORY_PRIBExecute(TObject *Sender);
	void __fastcall PERESH_PO_ABONExecute(TObject *Sender);
	void __fastcall RASHOD_GAZAExecute(TObject *Sender);
	void __fastcall cbKONTRClick(TObject *Sender);
	void __fastcall actESCExecute(TObject *Sender);
private:	// User declarations
public:		// User declaration
int NOM,ZAP,KOL,STAT_OTKL,NOW_TARIF,NEW_TARIF,VID_RASH,REDAKT,PR_SCH;
String DAT_OTKL,DAT_PODKL,PRIB;
	__fastcall TfrKART_ABON(TComponent* Owner);
	void __fastcall TfrKART_ABON::Obnovi();
	void __fastcall TfrKART_ABON::Prepare();
	void __fastcall TfrKART_ABON::SaveKart();
	int __fastcall TfrKART_ABON::Proverka();
	void __fastcall TfrKART_ABON::SaveLICEV();
	void __fastcall TfrKART_ABON::VIDIMOST();
	void __fastcall TfrKART_ABON::COUNTER();
	void __fastcall TfrKART_ABON::ADD_PRIB();
	void __fastcall TfrKART_ABON::KOR_PROJ();
	void __fastcall TfrKART_ABON::P_LG();
	void __fastcall TfrKART_ABON::PROSM_LG();
	void __fastcall TfrKART_ABON::REDAKT_PRIB();
	void __fastcall TfrKART_ABON::ADD_LG();
	void __fastcall TfrKART_ABON::PROVERKA_PRIB();
	void __fastcall TfrKART_ABON::PEREVOD(int TARIF, int NOM_ABO,int NEW_PRIZ);
	void __fastcall TfrKART_ABON::OTKL_PRIB(int TARIF, int NOM);
	void __fastcall TfrKART_ABON::PODKL_PRIB(int TARIF, int NOM);
	void __fastcall TfrKART_ABON::UST_PRIZN_OTKL();
	void __fastcall TfrKART_ABON::OTKL_PRIB();
	void __fastcall TfrKART_ABON::IZM_SPISOK_TRF(int NOM);
	void __fastcall TfrKART_ABON::STATUS_POV();
	void __fastcall TfrKART_ABON::INF_OPLATA();
	void __fastcall TfrKART_ABON::CLOSE_REDAKT_KART();
	void __fastcall TfrKART_ABON::PODKL_OTKL_PRIB(int STATUS_PODKL,TDateTime DAT,String TIP_PRIB,int TIP);
	};
//---------------------------------------------------------------------------
extern PACKAGE TfrKART_ABON *frKART_ABON;
//---------------------------------------------------------------------------
#endif
